package com.cskaoyan.shopping.converter;

import com.cskaoyan.shopping.dal.entitys.ItemCat;
import com.cskaoyan.shopping.dal.entitys.PanelContent;
import com.cskaoyan.shopping.dto.ShoppingCategoriesDto;
import com.cskaoyan.shopping.dto.ShoppingNavigationDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * @auther cskaoyan
 * @date 2022/5/18:11:45
 */
@Mapper(componentModel = "spring")
public interface ShoppingCategoriesConverter {

    @Mappings({
            @Mapping(source = "icon", target = "iconUrl"),
    }
    )
    ShoppingCategoriesDto itemCatDo2ShoppingCategoriesDto(ItemCat itemCat);


    List<ShoppingCategoriesDto> itemCatsDo2ShoppingCategoriesDtos(List<ItemCat> itemCats);
}
